
#ifndef __SHDEF_H__
#define __SHDEF_H__


#define FINSH_CMD_SIZE 80
#define FINSH_USING_MSH


#define RT_NULL                         (0)



#define rt_kprintf  printf


#define RT_EOK                          0               /**< There is no error */
#define RT_ERROR                        1               /**< A generic error happens */
#define RT_ETIMEOUT                     2               /**< Timed out */
#define RT_EFULL                        3               /**< The resource is full */
#define RT_EEMPTY                       4               /**< The resource is empty */
#define RT_ENOMEM                       5               /**< No memory */
#define RT_ENOSYS                       6               /**< No system */
#define RT_EBUSY                        7               /**< Busy */
#define RT_EIO                          8               /**< IO error */
#define RT_EINTR                        9               /**< Interrupted system call */
#define RT_EINVAL                       10              /**< Invalid argument */




typedef signed   char                   rt_int8_t;      /**<  8bit integer type */
typedef signed   short                  rt_int16_t;     /**< 16bit integer type */
typedef signed   int                    rt_int32_t;     /**< 32bit integer type */
typedef unsigned char                   rt_uint8_t;     /**<  8bit unsigned integer type */
typedef unsigned short                  rt_uint16_t;    /**< 16bit unsigned integer type */
typedef unsigned int                    rt_uint32_t;    /**< 32bit unsigned integer type */
typedef unsigned long                   rt_ubase_t;
typedef unsigned int                    rt_size_t;



#define RT_ASSERT(EX)                                                         \
if (!(EX))                                                                    \
{                                                                             \
    printf("error %s %d ",__FUNCTION__, __LINE__);                           \
}

#define RT_ALIGN_DOWN(size, align)      ((size) & ~((align) - 1))
#define RT_ALIGN_SIZE 4

#define rt_inline					static __inline


typedef int (*cmd_function_t)(int argc, char* argv[]);
typedef int (*call_func)();


typedef struct __cmd_desc{
	char 	*name;
    char	*desc;
	cmd_function_t func;
}cmd_desc_t;

#endif

